<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
</head>

<body>
  <style>
    /* content-visibility
      contain-intrinsic-size */

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    .item {
      /* color: #fff; */
    }

    .item1 {
      background-color: #40407a;
    }

    .item2 {
      background-color: #706fd3;
    }

    .item3 {
      background-color: #f7f1e3;
    }

    .item4 {
      background-color: #34ace0;
    }

    .item5 {
      background-color: #33d9b2;
    }

    .item6 {
      background-color: #ff5252;
    }

    .item7 {
      background-color: #ff793f;
    }

    .item8 {
      background-color: #ffb142;
    }

    .item9 {
      background-color: #84817a;
    }

    .item10 {
      background-color: #57606f;
    }

    .main {
      width: 500px;
      height: 500px;
      margin: 100px auto 0;
      border: 4px solid red;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(3, 1fr);
    }
  </style>
  <main class="main">
    <div class="item item1">1</div>
    <div class="item item2">2</div>
    <div class="item item3">3</div>
    <div class="item item4">4</div>
    <div class="item item5">5</div>
    <div class="item item6">6</div>
    <div class="item item7">7</div>
    <div class="item item8">8</div>
    <div class="item item9">9</div>
    <div class="item item10">10</div>
  </main>

  <script>
    const arr = [11, 22, 33, 44]
    arr.reduceRight((item1, item2) => {
      console.log(item1, item2)

      return item1 + item2

    }, 0)


  </script>
</body>

</html>